package bean_factory

import (
	"fmt"
	. "gitee.com/kristas/booting-go/framework/core/bean"
	"reflect"
)

type Processor interface {
	Order() int
	Filter(bean Bean) bool
	Do(bean Bean) error
}

const traceLogStr = "BeanLifeCycle | %s | %s | %s"

func traceLog(bean interface{}, lifeMethod string) string {
	return fmt.Sprintf(traceLogStr, lifeMethod, GetName(bean), reflect.TypeOf(bean))
}
